define([
	'vue',
	'config',
	'common'
	],function(Vue,config,utils){
	'use strict';
    	
	var consumerInquiriesDetailView=new Vue({
		el:'#app',
		data:{
			items:'',
			id:''
		},
		created:function(){
			utils.userToken();

			var _this = this;
			_this.id = utils.getQueryVariable('id');
			utils.ajax(utils.getWebUrl('declaration/get'),{
				id: _this.id
			},'POST',function(res){
				//console.log(res)
				_this.items = res.data;
			})
		},
		methods:{
			AddPhotoBrowser:function(event){
				//console.log($(event.currentTarget))
				var $target = $(event.currentTarget);
				var img = $(event.currentTarget).attr('src')
				var myApp = new Framework7();
				this.PhotoBrowser = myApp.photoBrowser({
				    zoom: 400,
				    photos: [img],
				    backLinkText: '关闭',
				    loop: false,
				    ofText:'/',
				    expositionHideCaptions: true
				});
				this.PhotoBrowser.open(); 
			},
		}
	})

	return consumerInquiriesDetailView;
});